package code;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class yootkdemo7 { 					// 李兴华高薪就业编程训练营
    public static void main(String[] args) throws Exception { 		// 沐言科技：www.yootk.com
        Map<String, String> map = new ConcurrentHashMap<String, String>(); // Map集合
        for (int num = 0; num < 10; num++) { 		// 循环定义线程
            new Thread(() -> {
                for (int x = 0; x < 10; x++) { 		// 循环存储数据
                    map.put("【" + Thread.currentThread().getName() +
                            "】x = " + x, "www.yootk.com");// 集合数据存储
                    System.out.println(map); 	// 集合输出
                }
            }, "Map集合操作线程 - " + num).start();	// 启动子线程
        }
    }
}
